home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir39
/
cmos16.zip
/
CMOS.OFS
< prev
next >
Wrap
Text File
|
1994-08-28
|
6KB
|
178 lines
How CMOS is used
****************
! = must be restored
* = checksummed
v = volatile
CMOS RAM map, PC/AT:
offset contents
v 00h Seconds time of day
v 01h Seconds Alarm
v 02h Minutes time of day
v 03h Minutes Alarm
v 04h Hours time of day
v 05h Hours Alarm
v 06h Day of the Week
v 07h Day of the Month
v 08h Month
v 09h Year 1980 = 0
0Ah Status Register A
bit 7 = updating time
bit 6:4 = system clock divider
bit 3:0 = periodic interrupt rate
! 0Bh Status Register B alarm
bit 7 = abort update cycle
bit 6 = enable periodic interrupt
bit 5 = enable alarm interrupt
bit 4 = enable update-ended interrupt
bit 3 = enable square wave generator
bit 2 = 1 = calendar in binary, 0 = bcd
bit 1 = 1 = 24 hour clock, 0 = 12 hour clock
bit 0 = 1 enable daylight savings
v 0Ch Status Register C flags
bit 7 = interrupt active
bit 6 = periodic interrupt flag
bit 5 = alarm flag
bit 4 = update end flag
bit 3:0 = reserved
! 0Dh Status Register D battery
bit 7 = Real Time Clock has power
bit 6:0 = reserved
! 0Eh Diagnostic Status Byte
bit 7 = RTC lost power
bit 6 = CMOS checksum bad
bit 5 = invalid system config
bit 4 = invalid memory size
bit 3 = fixed disk adapter failure
bit 2 = invalid CMOS time
bit 1 = reserved
bit 0 = reserved
! 0Fh Shutdown Status Byte
!* 10h Disk Drive Type for Drives A: and B:
The drive-type bytes use bits 7:4 (most significant nibble)
for the first floppy drive A: and 3:0 for B:
floppy drive types:
00h no drive present
01h 360KB
02h 1.2MB
03h 720KB
04h 1.44MB
05h 2.88MB
03h-0Fh reserved
!* 11h (AT):Reserved (PS/2):drive type for hard disk C:
!* 12h
(AT, XT/286):hard disk type for drives C: and D:
bits 7:4 C: bits 3:0 D:
(PS/2):drive type for hard disk D:
Format of drive-type entry for AT, XT/286:
0 number of cyls in drive (0-1023 allowed)
2 number of heads per drive (0-15 allowed)
3 starting reduced write compensation (not
used on AT)
5 starting cylinder for write compensation
7 max. ECC data burst length, XT only
8 control byte
Bit
7 disable disk-access retries
6 disable ECC retries
5-4 reserved, set to zero
3 more than 8 heads
2-0 drive option on XT (not used by AT)
9 timeout value for XT (not used by AT)
12 landing zone cylinder number
14 number of sectors per track (default 17,
0-17 allowed)
!* 13h Reserved
!* 14h Equipment Byte (corresponds to sw. 1 on PC and XT)
bits 7:6 - 00 = 1 floppy 01 = 2 floppies
bits 5:4 = 10 = colour 11 = mono
bit 1 = coprocessor present
bit 0 = 0 = floppies present
!* 15h-16h Base Memory Size in K (low,high)
!* 17h-18h Expansion Memory Size in K (low,high)
!* 19h drive C: extended info
!* 1Ah drive D: extended info
!* 1Bh-20h Reserved
(PS/2) POS information Model 50 (60 and 80 use a 2k
CMOS RAM that is not accessible through software)
!* 1Bh-1CH AMI type 46 cyls
!* 1Dh AMI type 46 head count
!* 1Eh-1Fh AMI type 46 write precomp starting cyl
!* 20h AMI type 46 control byte
!* 21h-22h AMI type 46 landing zone cylinder
!* 23h AMI type 46 sectors per track
!* 24h-25H AMI type 47 cyls
!* 26h AMI type 47 head count
!* 27h-28h AMI type 47 write precomp starting cyl
!* 29h AMI type 47 control byte
!* 2Ah-2Bh AMI type 47 landing zone cylinder
!* 2Ch AMI type 47 sectors per track
!* 21h-2Dh Reserved (possibly checksumed)
!* 2Eh-2Fh Checksum of Bytes 10:20 or 10:2F (low,high)
! 30h-31h Exp. Memory Size as Det. by POST (low,high)
v 32h Date Century Byte
! 33h Information Flags (set during power-on)
! 34h-3Fh Reserved
! 40h-79h Reserved for chipmaker
4Ah AST laptop backlight timeout in minutes
4Bh AST laptop hard disk timeout in minutes
4Ch-52h system password scan codes
!* 60h-61H Phoenix type 48 cyls
!* 62h Phoenix type 48 head count
!* 63h-64h Phoenix type 48 write precomp starting cyl
!* 65h-65h Phoenix type 48 landing zone cylinder
!* 67h Phoenix type 48 sectors per track
!* 75h-76H Phoenix type 49 cyls
!* 77h Phoenix type 49 head count
!* 78h-79h Phoenix type 49 write precomp starting cyl
!* 7Ah-7Bh Phoenix type 49 landing zone cylinder
!* 7Ch Phoenix type 49 sectors per track
Notes:
******
The alarm function is used to drive the BIOS WAIT function (int
15h function 90h).
To access the configuration RAM write the byte address (00-3Fh)
you need to access to I/O port 70h, then access the data via I/O
port 71h.
CMOS RAM chip is a Motorola 146818
The equipment byte is used to determine the configuration for
the POST power-on diagnostics.
Bytes 00-0Dh are defined by the chip for timing functions, bytes
0Eh-3Fh are defined by IBM.
Compaq 386 uses came CMOS chip as IBM AT. Extra functions:
byte 45 (2Dh) store additional info not maintained by AT
bit 0 indicates is Compaq dual-mode monitor isntalled
1 indicates whether keyclick is enabled
2 not used
3 if non-Compaq graphics adapter installed
Some CMOSes, (SXs) appear to store duplicates of registers 0:3F
in 40:7F, others (DXs) store some other advanced configuration
information in these registers. Thus there are 64 byte and 128
byte CMOSes. We tell them apart by looking for a match in bytes
in the checksum range.
Offsets 10:2F are included in the checksum. We do not ever
need to compute a checksum in CMOSREST since we just save and
restore. Exactly what is included in the checksum varies with
the BIOS. Sometimes only 10:20 is included.
For further information see the IBM AT Technical reference page
1-56. PC Magazine did an article on CMOS on page 344 of the
September 13, 1994 edition.
-30-